<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>soda教育后台管理</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<script src="js/main.js" type="text/javascript"></script>
<script type="text/javascript">
function ckloginname(){
	 var loginname=document.getElementById("loginname").value;
	 if(loginname==""){
			//alert("请输入姓名~");
			document.getElementById("s1").innerHTML="用户名密码错误";
			return false;
		}
	 document.getElementById("s1").innerHTML="";
	 return true;
}
function ckpassword(){
	var password=document.getElementById("password").value;
	if(password==""){
		document.getElementById("s2").innerHTML="请输入密码";
		return false;
	} 
	document.getElementById("s2").innerHTML="";
	return true;
}
/*
function ckyanzheng(){
var yanzheng=document.getElementById("yanzheng").value;
	if(yanzheng==""){
		alert("验证码不能为空！");
		
		return false;
	}
	
	return true;
}*/

function login(){
	
	if(ckloginname()&&ckpassword()){
		
		document.getElementById("form5").submit();
		
	}
	return false;
}
function huan(){
	document.getElementById("imgyz").src="<%=request.getContextPath() %>/ImgServlet?time="+new Date().getTime();
}

</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="no">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="100%" align="center" bgcolor="#e3efff">
    <table width="762" height="435" border="0" cellpadding="0" cellspacing="0" background="images/loginBg.gif">
      <tr>
        <td>
       <form  id="form5" action="<%=request.getContextPath() %>/LoginServlet?param=login" method="post" >
        <table border="0" align="center" cellpadding="0" cellspacing="7">
          <tr>
            <td>用户名：</td>
            <td style="width: 240px"><input name="loginname" id="loginname" type="text" class="inputbox" onblur="ckloginname()"  style="width:160px;hight:20px"><span style="color: red;" id="s1"></span></td>
            </tr>
          <tr>
            <td>密　码：</td>
            <td><input name="password" id="password" type="password" class="inputbox" onblur="ckpassword()" style="width:160px;hight:20px"><span style="color: red;" id="s2"></span></td>
            </tr>
          <tr><!--
          <tr>
            <td>验证码：</td>
            <td>
            <input name="yanzheng" id="yanzheng" type="text" size="4"  class="inputbox" style="width:60px;hight:40px">
            <img alt="请刷新" src="<%=request.getContextPath() %>/ImgServlet" id="imgyz"><a href="javascript:huan();">看不清，换一张</a>
            
            </td>
            </tr>
          <tr>
           --></form>
            <td height="100" colspan="2" valign="top"><table border="0" align="center" cellpadding="0" cellspacing="5">
              <tr>
                <td align="center"><BUTTON  onclick="return login()" style="HEIGHT:25px" ><img src="images/login_enter.gif" width="16" height="16" align="absmiddle"> 登录</BUTTON></td>
                <td align="center"><BUTTON  type="reset" style="HEIGHT:25px"><img src="images/login_cancel.gif" width="16" height="16" align="absmiddle"> 重置</BUTTON></td>
                </tr>
            </table></td>
            </tr>
          </table>
         
         </td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>